let __extends = (function (Son, Parent) {
  function getStaticExtendsWithForIn(Son, Parent) {
    for (let key in Parent) {
      if (Object.prototype.hasOwnProperty.call(Parent, key)) {
        Son[key] = Parent[key]
      }
    }
  }

  function getStaticExtendsWithObjectKeys(Son, Parent) {
    Object.keys(Parent).forEach(key => {
      Son[key] = Parent[key]
    })
  }

  function getStaticExtendsWithProto(Son, Parent) {
    Son.__proto__ = Parent;
  }

  let MyextendsStatic = function (Son, Parent) {
    let MyextendsStatic = Object.setPrototypeOf || getStaticExtendsWithForIn || getStaticExtendsWithObjectKeys || getStaticExtendsWithProto
    return MyextendsStatic(Son, Parent)
  }

  return function (Son, Parent) {
    MyextendsStatic(Son, Parent)
    function Middle() {
      this.constructor = Son;
    }
    if (Parent) {  // 如果不为空，如果父类存在
      Middle.prototype = Parent.prototype
      Son.prototype = new Middle()
    } else {  // 如果父类不存在
      Son.prototype = Object.create(null)
    }
    console.log("Object.create(null):", Object.create(null))
  }
}())
